Get Local Sellers
Method: GET
/api/v1/local-sellers
Description
This endpoint retrieves a list of local sellers (e.g., farmers or merchants) based on the provided filters. You can search by various criteria such as name, address, status, and date range.
🔑 Authentication
This endpoint requires authentication via headers.
| Param | Value | Type |
|---|---|---|
tenantId | {{tenantId}} | string |
userId | {{userId}} | string |
countryCode | {{countryCode}} | string |
Query Parameters
| Name | Type | Description |
|---|---|---|
localSellerSearch | string | Search for sellers by name or keyword. |
localSellerDateRange | string | Filter sellers by date range (e.g., 2020-11-12,2022-11-15). |
localSellerByAddress | string | Search sellers by address. |
localSellerByLga | string | Filter sellers by Local Government Area (comma-separated city codes). |
localSellerByStates | string | Filter sellers by states (comma-separated state codes). |
localSellerByCountries | string | Filter sellers by countries (comma-separated country codes). |
localSellerByTypes | string | Filter sellers by type (FARMER, MINER). |
localSellerByPhone | string | Search sellers by phone number. |
localSellerByLastName | string | Search sellers by last name. |
localSellerByStatuses | string | Filter sellers by status (PENDING, ACCEPTED, REJECTED, AWAITING_APPROVAL). |
localSellerByFirstname | string | Search sellers by first name. |
localSellerByEmail | string | Search sellers by email address. |
byTenantIds | string | Filter by tenant IDs (comma-separated). |
byUserIds | string | Filter by user IDs (comma-separated). |
byBusinessIds | string | Filter by business IDs (comma-separated). |
order | string | Sort results in ascending (ASC) or descending (DESC) order. |
page | string | Specify the page number for paginated results. |
limit | string | Specify the number of results per page. |
Example Request
GET /api/v1/local-sellers?localSellerByStates=LA,AB&page=1&limit=10
Response: 200
[
{
"sellerId": "67a81ecca9a55da218c22c35",
"type": "FARMER",
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"address": "123 Market Road",
"state": "Lagos",
"country": "Nigeria",
"phone": "+2348012345678",
"createdAt": "2025-02-12T04:04:39.986Z",
"status": "ACCEPTED"
},
{
"sellerId": "89b23fdda1c99cb443f87d02",
"type": "MINER",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane.smith@example.com",
"address": "45 Gold Street",
"state": "Abuja",
"country": "Nigeria",
"phone": "+2348098765432",
"createdAt": "2025-02-10T11:22:30.000Z",
"status": "PENDING"
}
]
LANGUAGE
CURL REQUEST
curl --request GET \
--url /api/v1/local-sellers \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!